home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 4.5 KB | 275 lines | [TEXT/MPS ] |
- ;
- ; File: FixMath.a
- ;
- ; Contains: Fixed Math Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__FIXMATH__') = 'UNDEFINED' THEN
- __FIXMATH__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- fixed1 EQU $00010000
- fract1 EQU $40000000
- positiveInfinity EQU $7FFFFFFF
- negativeInfinity EQU $80000000
-
- ;
- ; pascal Fract Fix2Frac(Fixed x)
- ;
- IF ¬ GENERATINGCFM THEN
- _Fix2Frac: OPWORD $A841
- ELSE
- IMPORT_CFM_FUNCTION Fix2Frac
- ENDIF
-
- ;
- ; pascal long Fix2Long(Fixed x)
- ;
- IF ¬ GENERATINGCFM THEN
- _Fix2Long: OPWORD $A840
- ELSE
- IMPORT_CFM_FUNCTION Fix2Long
- ENDIF
-
- ;
- ; pascal Fixed Long2Fix(long x)
- ;
- IF ¬ GENERATINGCFM THEN
- _Long2Fix: OPWORD $A83F
- ELSE
- IMPORT_CFM_FUNCTION Long2Fix
- ENDIF
-
- ;
- ; pascal Fixed Frac2Fix(Fract x)
- ;
- IF ¬ GENERATINGCFM THEN
- _Frac2Fix: OPWORD $A842
- ELSE
- IMPORT_CFM_FUNCTION Frac2Fix
- ENDIF
-
- ;
- ; pascal Fract FracMul(Fract x, Fract y)
- ;
- IF ¬ GENERATINGCFM THEN
- _FracMul: OPWORD $A84A
- ELSE
- IMPORT_CFM_FUNCTION FracMul
- ENDIF
-
- ;
- ; pascal Fixed FixDiv(Fixed x, Fixed y)
- ;
- IF ¬ GENERATINGCFM THEN
- _FixDiv: OPWORD $A84D
- ELSE
- IMPORT_CFM_FUNCTION FixDiv
- ENDIF
-
- ;
- ; pascal Fract FracDiv(Fract x, Fract y)
- ;
- IF ¬ GENERATINGCFM THEN
- _FracDiv: OPWORD $A84B
- ELSE
- IMPORT_CFM_FUNCTION FracDiv
- ENDIF
-
- ;
- ; pascal Fract FracSqrt(Fract x)
- ;
- IF ¬ GENERATINGCFM THEN
- _FracSqrt: OPWORD $A849
- ELSE
- IMPORT_CFM_FUNCTION FracSqrt
- ENDIF
-
- ;
- ; pascal Fract FracSin(Fixed x)
- ;
- IF ¬ GENERATINGCFM THEN
- _FracSin: OPWORD $A848
- ELSE
- IMPORT_CFM_FUNCTION FracSin
- ENDIF
-
- ;
- ; pascal Fract FracCos(Fixed x)
- ;
- IF ¬ GENERATINGCFM THEN
- _FracCos: OPWORD $A847
- ELSE
- IMPORT_CFM_FUNCTION FracCos
- ENDIF
-
- ;
- ; pascal Fixed FixATan2(long x, long y)
- ;
- IF ¬ GENERATINGCFM THEN
- _FixATan2: OPWORD $A818
- ELSE
- IMPORT_CFM_FUNCTION FixATan2
- ENDIF
-
- IF GENERATINGPOWERPC THEN
- ;
- ; short WideCompare(const wide *target, const wide *source)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideCompare
- ENDIF
-
- ;
- ; WidePtr WideAdd(wide *target, const wide *source)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideAdd
- ENDIF
-
- ;
- ; WidePtr WideSubtract(wide *target, const wide *source)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideSubtract
- ENDIF
-
- ;
- ; WidePtr WideNegate(wide *target)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideNegate
- ENDIF
-
- ;
- ; WidePtr WideShift(wide *target, long shift)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideShift
- ENDIF
-
- ;
- ; unsigned long WideSquareRoot(const wide *source)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideSquareRoot
- ENDIF
-
- ;
- ; WidePtr WideMultiply(long multiplicand, long multiplier, wide *target)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideMultiply
- ENDIF
-
- ; returns the quotient
- ;
- ; long WideDivide(const wide *dividend, long divisor, long *remainder)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideDivide
- ENDIF
-
- ; quotient replaces dividend
- ;
- ; WidePtr WideWideDivide(wide *dividend, long divisor, long *remainder)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideWideDivide
- ENDIF
-
- ;
- ; WidePtr WideBitShift(wide *src, long shift)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION WideBitShift
- ENDIF
-
- ENDIF
- IF GENERATING68K ** ¬ GENERATING68881 THEN
- ;
- ; pascal double_t Frac2X(Fract x)
- ;
- IF ¬ GENERATINGCFM THEN
- _Frac2X: OPWORD $A845
- ELSE
- IMPORT_CFM_FUNCTION Frac2X
- ENDIF
-
- ;
- ; pascal double_t Fix2X(Fixed x)
- ;
- IF ¬ GENERATINGCFM THEN
- _Fix2X: OPWORD $A843
- ELSE
- IMPORT_CFM_FUNCTION Fix2X
- ENDIF
-
- ;
- ; pascal Fixed X2Fix(double_t x)
- ;
- IF ¬ GENERATINGCFM THEN
- _X2Fix: OPWORD $A844
- ELSE
- IMPORT_CFM_FUNCTION X2Fix
- ENDIF
-
- ;
- ; pascal Fract X2Frac(double_t x)
- ;
- IF ¬ GENERATINGCFM THEN
- _X2Frac: OPWORD $A846
- ELSE
- IMPORT_CFM_FUNCTION X2Frac
- ENDIF
-
- ELSE
- ;
- ; pascal double_t Frac2X(Fract x)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION Frac2X
- ENDIF
-
- ;
- ; pascal double_t Fix2X(Fixed x)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION Fix2X
- ENDIF
-
- ;
- ; pascal Fixed X2Fix(double_t x)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION X2Fix
- ENDIF
-
- ;
- ; pascal Fract X2Frac(double_t x)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION X2Frac
- ENDIF
-
- ENDIF
- ENDIF ; __FIXMATH__
-